package com.perfma.xtest.agent;

import java.net.URL;
import java.util.List;

/**
 *
 *
 * @author: junhui.si
 * @date: 2024-08-19 11:08
 **/
public class ClassLocation {
    public static void main(String[] args) throws Exception {
//        java.security.ProtectionDomain protectionDomain = ClassLocation.class.getProtectionDomain();
//        CodeSource codeSource = protectionDomain.getCodeSource();
//        URL url = codeSource.getLocation();
//        URI uri = url.toURI();
//        uri = uri.resolve("..");
//        String path = uri.getPath();
//        System.out.println(path);

//        Double version = Double.valueOf(System.getProperty("java.vm.specification.version"));
//        System.out.println(version);

//        List<URL> vmProviderJars = VmProvider.getURL("/Users/sijunhui/Downloads/log/agent学习/perfma-java-agent/jvmversion", 1.8d);
//        System.out.println(vmProviderJars);

        String var1 = System.getProperty("java.class.path");
        System.out.println(var1);
    }
}
